﻿@using Mangix.Mapping.SysLog
@model Mangix.Admin.Framework.Datatable.DataSourceResult<Mangix.Entities.SysLog>
@{
    var arg = Model.SearchArg as Mangix.Mapping.SysLog.AdminSearchLogArg;
    ViewBag.Title = "系统日志列表";
} 
    <h1>@ViewBag.Title</h1>
    <hr />
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-body">
                    @using (Html.BeginRouteForm("sysLogIndex", new { }, FormMethod.Get, new { @class = "form-inline" }))
                    {
                          
                    }
                </div>
            </div>
        </div>
    </div>
    @if (Model != null && Model.Data != null)
    {
        <div class="row">
            <div class="col-sm-12">
                <table id="user_datatable" class="table table-striped table-bordered table-hover dataTable no-footer">
                    <thead>
                        <tr>
                            <th width="50px">类型</th>
                            <th width="150px">错误</th>
                            <th width="">错误详情</th>
                            <th width="100px">IP地址</th>
                            <th width="">连接</th>
                            <th width="">ReferrerUrl</th> 
                            <th width="160">时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model.Data)
                        {
                            <tr>
                                <td>@(Enum.GetName(typeof(EnumLevel),item.Level))</td>
                                <td>@item.ShortMessage</td>
                                <td>@item.FullMessage</td>
                                <td>@item.IpAddress</td>
                                <td>@item.PageUrl</td>
                                <td>@item.ReferrerUrl</td>
                                <td>@(item.CreationTime.ToString("yyyy-MM-dd HH;mm:ss"))</td>
                           </tr>
                        }
                    </tbody>
                </table>
                @Pagination(Model.Paging)
            </div>
        </div>
    } 